package com.huage_06.lesson_02;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class CollectionDemo {
    public static void main(String[] args) {
        Collection<String> c =new ArrayList<String>();
        c.add("Hello");
        c.add("World");
        c.add("java");

        Iterator<String> it = c.iterator();
        while (it.hasNext()){
            System.out.println(it.next());
        }

    }
}
